<?

	/* Theme functions, these are called from the main theme or the blog system */
	
/*	
	function drawProfile() {
		global $blogname,$profileimg;
		
		echo "\r\n";
		echo "\t<div id='profile'>\r\n";
		if ($profileimg) echo "\t\t<img src='".$profileimg."'/>\r\n";
		echo "\t\t<h1><a href='?'>".$blogname."</a></h1>";
		echo "\r\n";
		echo "\t</div>";

	}
*/	


	
	$columncount=0;
	
	function theme_drawTweet(
			$itemAction,
			$itemCaption,
			$itemPost,
			$itemLink,
			$itemCommentLink,
			$itemDate,
			$itemServiceName)
	{
			global $columncount;

						$tweet="<div id='tweet'>";

							$tweet.="<small>".$itemAction."</small><br/>";
							$tweet.="<div id='innertweet' ";
							
							if ($itemServiceName=="youtube") $tweet.="style='background: red;'";
							if ($itemServiceName=="twitter") $tweet.="style='font-size:110%; padding:10 0 10 0;'";
							
							$tweet.=">";

								if ($itemCaption) $tweet.=$itemCaption."<a href='".$itemLink."'>&#187;</a><br/>";
								else {
									// we might need to do some scaling
									if ($itemServiceName=="youtube") {
										$itemPost=str_replace("width=\"425\"","width=\"220\"",$itemPost);
										$itemPost=str_replace("height=\"344\"","height=\"180\"",$itemPost);
									} else if ($itemServiceName=="vimeo") {
										$itemPost=str_replace("width=\"400\"","width=\"220\"",$itemPost);
										$itemPost=str_replace("height=\"300\"","height=\"180\"",$itemPost);
									}
									$tweet.=$itemPost;
								}

							$tweet.="</div>";
							$tweet.="<small>".$itemDate." | ".$itemCommentLink."</small>";

						$tweet.="</div>";
						
						$columncount++;
						if ($columncount==3) {
							$tweet.="<div style='clear:both;'> </div>";
							$columncount=0;
						}
						return $tweet;
	}





?>
